/////////////////////////////////////////////////////////////////////////////
// Name:        dgt_mainframe.h
// Purpose:     
// Author:      Aleksey Plotnikov & Alla Nabatova
// Modified by: 
// Created:     19/03/2008 22:25:33
// RCS-ID:      
// Copyright:   Diamant Software
// Licence:     
/////////////////////////////////////////////////////////////////////////////

#ifndef _DGT_MAINFRAME_H_
#define _DGT_MAINFRAME_H_

#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dgt_mainframe.h"
#endif

/*!
 * Includes
 */

////@begin includes
#include "wx/frame.h"
#include "wx/aui/auibook.h"
#include "wx/splitter.h"
#include "wx/listctrl.h"
#include "wx/statline.h"
////@end includes
#include "dgt_PluginManagerDlg.h"
#include "dgt_DoControl.h"
#include "dgt_IfControl.h"
#include "dgt_BeginEndControl.h"
#include "dgt_ListCtrl.h"
#include "dgt_Algorithm.h"
/*!
 * Forward declarations
 */

////@begin forward declarations
class wxSplitterWindow;
class dgt_ListCtrl;
////@end forward declarations

/*!
 * Control identifiers
 */

////@begin control identifiers
#define ID_DGT_MAINFRAME 10019
#define ID_NEW 10000
#define ID_OPEN 10001
#define ID_SAVE 10002
#define ID_SAVEAS 10003
#define ID_SYNTEZ 10027
#define ID_PRINT 10004
#define ID_EXIT 10006
#define ID_TESTONLY 10005
#define ID_TESTONLY2 10008
#define ID_PLUGINDIALOG 10029
#define ID_AUINOTEBOOK1 10013
#define ID_PANEL 10007
#define ID_SPLITTERWINDOW1 10009
#define ID_PANEL1 10010
#define ID_INPUTVARS 10014
#define ID_INTRVARS 10020
#define ID_OUTVARS 10022
#define ID_PANEL2 10011
#define ID_AUINOTEBOOK2 10012
#define ID_PANEL3 10015
#define ID_TEXTCTRL1 10018
#define ID_PANEL4 10016
#define ID_BITMAPBUTTON 10021
#define ID_BITMAPBUTTON1 10024
#define ID_BITMAPBUTTON2 10025
#define ID_BITMAPBUTTON3 10026
#define ID_PANEL5 10017
#define SYMBOL_DGT_MAINFRAME_STYLE wxDEFAULT_FRAME_STYLE|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_DGT_MAINFRAME_TITLE _("Digital studio")
#define SYMBOL_DGT_MAINFRAME_IDNAME ID_DGT_MAINFRAME
#define SYMBOL_DGT_MAINFRAME_SIZE wxSize(600, 400)
#define SYMBOL_DGT_MAINFRAME_POSITION wxDefaultPosition
////@end control identifiers


/*!
 * dgt_MainFrame class declaration
 */

class dgt_MainFrame: public wxFrame
{    
    DECLARE_CLASS( dgt_MainFrame )
    DECLARE_EVENT_TABLE()

public:
    /// Constructors
    dgt_MainFrame();
    dgt_MainFrame( wxWindow* parent, wxWindowID id = SYMBOL_DGT_MAINFRAME_IDNAME, const wxString& caption = SYMBOL_DGT_MAINFRAME_TITLE, const wxPoint& pos = SYMBOL_DGT_MAINFRAME_POSITION, const wxSize& size = SYMBOL_DGT_MAINFRAME_SIZE, long style = SYMBOL_DGT_MAINFRAME_STYLE );

    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_DGT_MAINFRAME_IDNAME, const wxString& caption = SYMBOL_DGT_MAINFRAME_TITLE, const wxPoint& pos = SYMBOL_DGT_MAINFRAME_POSITION, const wxSize& size = SYMBOL_DGT_MAINFRAME_SIZE, long style = SYMBOL_DGT_MAINFRAME_STYLE );

    /// Destructor
    ~dgt_MainFrame();

    /// Initialises member variables
    void Init();

    /// Creates the controls and sizers
    void CreateControls();

////@begin dgt_MainFrame event handler declarations

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_OPEN
    void OnOpenClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_SAVE
    void OnSaveClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_SAVEAS
    void OnSaveasClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_SYNTEZ
    void OnSyntezClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TESTONLY
    void OnTestonlyClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TESTONLY2
    void OnTestonly2Click( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_PLUGINDIALOG
    void OnPlugindialogClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BITMAPBUTTON1
    void OnDoButtonClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BITMAPBUTTON2
    void OnIfButtonClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BITMAPBUTTON3
    void OnBeginEndButtonClick( wxCommandEvent& event );

////@end dgt_MainFrame event handler declarations

////@begin dgt_MainFrame member function declarations

    /// Retrieves bitmap resources
    wxBitmap GetBitmapResource( const wxString& name );

    /// Retrieves icon resources
    wxIcon GetIconResource( const wxString& name );
////@end dgt_MainFrame member function declarations

    /// Should we show tooltips?
    static bool ShowToolTips();

private:

	void	FillVariablesList( void );
	void	FillTextList( void );

////@begin dgt_MainFrame member variables
    wxPanel* m_Panel;
    wxSplitterWindow* m_Splitter;
    dgt_ListCtrl* m_InputVars;
    dgt_ListCtrl* m_IntrVars;
    dgt_ListCtrl* m_OutputVars;
    wxPanel* m_SchemaPanel;
    wxTextCtrl* m_AlgText;
    wxBitmapButton* m_NewSchButton;
    wxBitmapButton* m_DoButton;
    wxBitmapButton* m_IfButton;
    wxBitmapButton* m_BeginEndButton;
    wxPanel* m_DrawPanel;
////@end dgt_MainFrame member variables

	dgt_Algorithm_Ptr m_Alg;
};

#endif
    // _DGT_MAINFRAME_H_
